# IBM InfoPrint Client ebuild 
# Created by Scott Richey <srichey@us.ibm.com>

DESCRIPTION="InfoPrint backend for CUPS"
SRC_URI="ftp://twmlinux.raleigh.ibm.com/gentoo/IBM/ipselect-1.0-2.noarch.rpm"
HOMEPAGE="http://w3.opensource.ibm.com/~gentoo-ebuilds"
DEPEND="app-arch/rpm
		net-print/ipm-client
		net-print/cups"
RDEPEND="${DEPEND}"
LICENSE="IBM Internal"
IUSE=""
KEYWORDS="x86"

src_unpack() {
	rpm2cpio ${DISTDIR}/${A} | cpio -i --make-directories

}

src_install() {
	cd ${WORKDIR}
	cp -R usr/ ${D}/
}

pkg_postinst() {
	einfo ""
	einfo "This backend looks for the \"user.att\" attribute file in"
	einfo "the directory \$HOME/.ipselect/. The user.att file will be passed"
	einfo "to the \"pdpr\" command if it exists."
	einfo ""
	einfo "To print to any IPM printer, use the following device URI:"
	einfo "ipselect://printserver/printername"
	einfo "Raw postscript should work fine with nearly every printer."
	einfo ""
	einfo "Any problems can be viewed via the cups log."
	einfo "Don't forget to restart CUPS after installing."
	einfo ""
}
